package com.wise.mall.common.model;

import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;

/**
 * @author shiweinan
 */

@AllArgsConstructor
@NoArgsConstructor
public enum ResultCode implements IResultCode {

    SUCCESS(200, ""),
    FAILED(500, "系统异常"),
    VALIDATE_FAILED(404, "参数检验失败"),
    UNAUTHORIZED(401, "暂未登录或token已经过期"),
    FORBIDDEN(403, "没有相关权限");

    private long code;
    private String message;

    @Override
    public long getCode() {
        return this.code;
    }

    @Override
    public String getMessage() {
        return this.message;
    }
}
